#include <iostream>
#include <string>
using namespace std;

int main()
{
    int count = 0, n = 0;
    cin >> n >> count;
    string s;
    cin >> s;
    string ret;
    ret.resize(n);
    while (count--)
    {
        int i = 0;
        while (i < s.size())
        {
            if (i == 0)
                ret[i] = s[i];
            else
                ret[i] = ((s[i - 1] - '0') ^ (s[i] - '0')) + '0';

            ++i;
        }
        s = ret;
    }
    cout << ret << endl;
    return 0;
}